﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TanmiaGrp.Basis.Core;

namespace TanmiaGrp.GeneralLedger.Core
{
    public enum NotebookTypeEnum
    {
        PayableNotebook,
        ReceivableNotebook,
        JournalNotebook
    }

    public abstract class Notebook : BusinessObject
    {
        private int notebookID;
        private string notebookName;
        private long startPageNumber;
        private long endPageNumber;
        private long currentPage;
        private NotebookTypeEnum notebookType;

        public int NotebookID
        {
            get { return notebookID; }
            set
            {
                if (notebookID != value)
                {
                    notebookID = value;
                    RaisePropertyChanged(() => NotebookID);
                }
            }
        }

        public string NotebookName
        {
            get { return notebookName; }
            set
            {
                if (notebookName != value)
                {
                    notebookName = value;
                    RaisePropertyChanged(() => NotebookName);
                }
            }
        }

        public long StartPageNumber
        {
            get { return startPageNumber; }
            set
            {
                if (startPageNumber != value)
                {
                    startPageNumber = value;
                    RaisePropertyChanged(() => StartPageNumber);
                }
            }
        }

        public long EndPageNumber
        {
            get { return endPageNumber; }
            set
            {
                if (endPageNumber != value)
                {
                    endPageNumber = value;
                    RaisePropertyChanged(() => EndPageNumber);
                }
            }
        }

        public long CurrentPage
        {
            get{return currentPage;}
            set
            {
                if (currentPage != value)
                {
                    currentPage = value;
                    RaisePropertyChanged(() => CurrentPage);
                }
            }
        }

        public NotebookTypeEnum NotebookType
        {
            get { return notebookType; }
            set
            {
                if (notebookType != value)
                {
                    notebookType = value;
                    RaisePropertyChanged(() => NotebookType);
                }
            }
        }
    }
}